package com.liuxingwu.client;



/**
 * @author LiuXingWu
 * @create 2021-01-23 23:12
 */
public class test {
    public static void main(String[] args) {
        String str = "@123456-2";
        if (str.startsWith("@") && (str.contains("-"))) {
            String userName = str.split("@")[1].split("-")[0];
            System.out.println(userName);
        } else {
            System.out.println("false");
        }
    }
}
